/**
 * 
 */
package org.wicket.jbpm.engine.spring;

import java.io.InputStream;
import java.util.List;
import java.util.Stack;

import org.jbpm.graph.def.ProcessDefinition;
import org.wicket.jbpm.engine.exception.WicketJbpmException;
import org.wicket.jbpm.engine.utils.JbpmVars;
import org.wicket.jbpm.engine.workflow.WfDeployment;
import org.wicket.jbpm.engine.workflow.WfTask;

/**
 * @author Emmanuel Nollase - emanux 
 * created: May 29, 2009 - 11:19:40 AM
 */
public interface JbpmProcessEngine
{

    /**
     * Deploys the processdefinition
     * @param stream
     * @param mimeType
     * @return
     * @throws WicketJbpmException
     */
    WfDeployment deployDefinition(InputStream stream, String mimeType) throws WicketJbpmException;

    /**
     * Get the process definition
     * @param def - process name
     * @return
     * @throws WicketJbpmException
     */
    ProcessDefinition getDefinition(final String def) throws WicketJbpmException;

    /**
     * Get all deployed Process Definition
     * @return
     * @throws WicketJbpmException
     */
    List<ProcessDefinition> getDefinitions() throws WicketJbpmException;
   
    /**
     * Get Process definition name attach to a taskinstance
     * @param taskInstanceId
     * @return
     * @throws WicketJbpmException
     */
    String[] getProcessName(final Long taskInstanceId) throws WicketJbpmException;
    
    /**
     * Get's the variables defined in the particular task
     * @param wfTask
     * @return
     */
    Stack<JbpmVars> getJbpmVars(final WfTask wfTask);
}
